<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String id = request.getParameter("id");
	if (id == null) {
		id = "";
	}
%>
<script type="text/javascript">
	$(function() {
		$('#areaid').combotree({
			url : '${ctx}/autoinn/area/treegrid',
			idFiled : 'id',
			textFiled : 'text',
			parentField : 'pid',
			lines : true
		});
<%if (id != "") {%>
	$.post('${ctx}/autoinn/area/areaser?id='
				+ $(':input[name="id"]').val(), {
			id : $(':input[name="id"]').val(),
		}, function(result) {
			if (result.id != undefined) {
				//alert(result.status+" 和"+result.remarks+"还有"+result.sort);
				$('form').form('load', {

					'id' : result.id,
					'areaname' : result.areaname,
					'pid' : result.pid,
					'sort' : result.sort,
					'state' : result.state,
					 'islast':result.islast
				});
				//alert(result.lid);
				//$('#iconCls').attr('class', result.iconCls);//设置背景图标
			}
			$.messager.progress('close');
		}, 'json');
<%}%>
	});
</script>
<div align="center" id="dil">
	<form id="area_updateForm" method="POST" class="zzld_form">
		<input type="hidden" name="id" value="<%=id%>" />
		<table class="zzld_table" style="width: 100%">
			<tr>
				<th>名称：</th>
				<td colspan="3"><input name="areaname"
					value="" class="easyui-validatebox" data-options="required:true"
					missingMessage="请输入名称!" style="width: 87%;" /></td>
			</tr>
			<tr>
				<th>上级菜单：</th>
				<td ><input id="areaid" name="pid"
					class="easyui-combotree" style="width: 155px;" /></td>
				<th>节点初始：</th>
				<td><select name="islast"
					class="easyui-combobox" style="width: 155px;">
						<option value="1">展开</option>
						<option value="0">不展开</option>
				</select></td>
			</tr>
			<tr>
				<th>排序：</th>
				<td><input name="sort"
					class="easyui-numberspinner" style="width: 155px;" value="100" /></td>
				<th>可用状态：</th>
				<td><select name="state"
					class="easyui-combobox" style="width: 1200px;">
						<option value="1">已激活</option>
						<option value="0">未激活</option>
				</select></td>
			</tr>

		</table>
	</form>
</div>
